print("方法一")
for i in range(100, 1000):
    a = i // 100
    b = (i - a * 100) // 10
    c = (i - a * 100 - b * 10)
    if i == pow(a, 3) + pow(b, 3) + pow(c, 3):
        print(i)
print("方法二")
for n in range(100, 1000):
    i = n // 100
    j = n // 10 % 10
    k = n % 10
    if n == i ** 3 + j ** 3 + k ** 3:
        print(n)
print("方法三")
for i in range(1,10):
    for j in range(0,10):
        for k in range(0,10):
            if i*100+j*10+k==i**3+j**3+k**3:
                print(i*100+j*10+k)